import React, {Component} from "react";

export default class Home extends Component {
    state = {
        time: 5
    }

    componentDidMount() {
        setTimeout(function () {
            clearInterval(t);
            //location = "/";
        }, 5000);
        let t = setInterval(function () {
            let num = this.state.time - 1;
            this.setState({
                time: num
            })
        }.bind(this), 1000);
    }

    render() {
        return (
            <div
                className="layout-aside">
                <div
                    className="layout-header">
                    </div>
                    <div style={
                        {
                            textAlign: 'center', paddingTop: '50px'
                        }
                        }>
                        <div className="notfund"> </div>
                            <span style={  {marginTop: '30px' } }> 您访问的页面不存在，{ this.state.time }  秒后进入登录页面。</span>
                        </div>
                    </div> )
     }
};
